{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from numpy import math\n",
    "%matplotlib inline\n",
    "\n",
    "\n",
    "loansData = pd.read_csv('https://spark-public.s3.amazonaws.com/dataanalysis/loansData.csv')\n",
    "\n",
    "#Note, a schema can be found here : https://github.com/herrfz/dataanalysis/blob/master/assignment1/Assignment1.pdf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['Amount.Requested', 'Amount.Funded.By.Investors', 'Interest.Rate',\n",
       "       'Loan.Length', 'Loan.Purpose', 'Debt.To.Income.Ratio', 'State',\n",
       "       'Home.Ownership', 'Monthly.Income', 'FICO.Range',\n",
       "       'Open.CREDIT.Lines', 'Revolving.CREDIT.Balance',\n",
       "       'Inquiries.in.the.Last.6.Months', 'Employment.Length'],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loansData.columns.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "81174     6541.67\n",
       "99592     4583.33\n",
       "80059    11500.00\n",
       "15825     3833.33\n",
       "33182     3195.00\n",
       "Name: Monthly.Income, dtype: float64"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loansData['Monthly.Income'][0:5] # first five rows of Interest.Rate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEICAYAAABWJCMKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh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wHLqebBvoIcGiS0T9O7LfvqT7V7c8Bvs/0n4PFcj9wfynlxrr+BbpAGMSx\nfTVwTynlu6WUHwFfpBvvQR3bUQsxlhOdY8YGKQD26a+ZqFf6Pw3cUUr5UG/TlcDoHQLr6a4NjJaf\nVe8yWAs8Wj8eXgucmGR5fTd2It2c6U7gsSRr67nO6h1rQZVS3lFKWVlKWUU3Tv+7lHIm8FXgd2q1\nsX0dfQ5+p9Yvtfz0eifJUcBqugtoS+p3oZTyIHBfkl+pRSfQfQX6wI0t3dTP2iTPrm0Z7etAjm3P\nQozlROeYuYW+eDLPF2bW0d09czfwrsVuzzTb/kq6j3S3At+qj3V086Gbga3AV4DDav3Q/ec6dwO3\nAWt6x3oDsK0+Xt8rXwPcXvf5C8ZclFykfg/z07uAXkD3j3wb8N+AA2r5gXV9W93+gt7+76r9uYve\nnS9L7XcBeAlwcx3fv6a782Mgxxb4c+DO2p5L6e7kGZixBS6ju77xI7pPd29ciLGc6ByzefhVEJLU\nqEGaApIkTYMBIEmNMgAkqVEGgCQ1ygCQpEYZAJLUKANAkhr1/wHRt9SIdH98sAAAAABJRU5ErkJg\ngg==\n",
      "text/plain": [
       "<Figure size 600x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "inc = loansData['Monthly.Income']\n",
    "h = inc.hist()\n",
    "plt.title('Histogram of Monthly Income')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "loansData['Monthly.LogIncome'] = [ math.log(x) for x in inc ]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEICAYAAABRSj9aAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29m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Bf2m7pmmwLSKOAij/PtByPZoCg34w3kql3TbFj4DT\nIuLQiAia6xEbWq5pYCLi18q/x9D0z/99uxVNizXAkjK8BLi2xVo0RX4zts8i4jCaIPyNzHyk7XoG\nJSL+HHgLsBP4LvCuzHyy3aoGIyL+D3AE8BRwYWaubbmkvoqIK4FRmp/r3QZ8BPgycBVwDLAZeHNm\ndl+wnXEmaOtPgf8BvBB4GLgtM/9DWzUOgkEvSZWz60aSKmfQS1LlDHpJqpxBL0mVM+glqXIGvSRV\nzqCXpMr9f1vfB1tQxZkUAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 600x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure()\n",
    "h = loansData['Monthly.LogIncome'].hist()\n",
    "plt.title('Histogram of Log(Monthly Income)')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    2499.000000\n",
       "mean        8.501915\n",
       "std         0.523019\n",
       "min         6.377577\n",
       "25%         8.160518\n",
       "50%         8.517193\n",
       "75%         8.824678\n",
       "max        11.540054\n",
       "Name: Monthly.LogIncome, dtype: float64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "loansData['Monthly.LogIncome'].describe()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
